package com.alibaba.citrus.cr.sales.plan.api.salesplan;

import com.alibaba.citrus.cr.sales.plan.dto.api.request.CreateSalesPlanTemplateRequest;
import com.alibaba.citrus.cr.sales.plan.dto.api.request.EditDepartmentTaskRequest;
import com.alibaba.citrus.cr.sales.plan.dto.api.request.EditPublishStatusRequest;
import com.alibaba.citrus.cr.sales.plan.sdo.SalesPlanSDO;
import com.alibaba.citrus.cr.sales.plan.sdo.SalesPlanStatScItemSDO;
import com.alibaba.lattice2.epoch.meshflow.model.annotation.MeshFlowService;
import com.alibaba.lattice2.epoch.sdk.model.Result;

import java.util.List;

/**
 * @author yuhailin
 * @description:
 * @date 2021-09-06 19:10
 */
@MeshFlowService(apps = {"bc_order"}, name = "salesPlanWriteService")
public interface SalesPlanWriteService {
    /**
     * 创建月度计划
     *
     * @param salesPlanSDO
     * @return
     */
    Result<String> createSalesPlan(SalesPlanSDO salesPlanSDO);

    /**
     * 编辑月度计划
     *
     * @param salesPlanSDO
     * @return
     */
    Result<Boolean> editSalesPlan(SalesPlanSDO salesPlanSDO) ;

    /**
     * 月度计划-回复 （crm 回调)  公司货品维度统计的列表数据
     *
     * @param updateSalesPlanRequest
     * @return
     */
    Result<Boolean> reply(List<SalesPlanStatScItemSDO> updateSalesPlanRequest);

    /**
     * 更新部门任务量
     *
     * @param editDepartmentTaskRequest
     * @return
     */
    Result<Boolean> updateDepartmentTask(EditDepartmentTaskRequest editDepartmentTaskRequest);

    /**
     * 更新发布部门任务量发布状态
     *
     * @param editPublishStatusRequest
     * @return
     */
    Result<Boolean> updatePublishStatus(EditPublishStatusRequest editPublishStatusRequest);

    /**
     * 月度计划-任务分配（部门货品维度统计的列表数据）
     *
     * @param updateSalesPlanRequest
     * @return
     */
    Result<Boolean> dispatchTask(List<SalesPlanStatScItemSDO> updateSalesPlanRequest);

    /**
     * 月度计划-发布（部门货品维度统计的列表数据）
     *
     * @param salesPlanScItemStatSDO
     * @return
     */
    Result<Boolean> deploySalesPlan(SalesPlanStatScItemSDO salesPlanScItemStatSDO);

    /**
     * 修改月度计划状态    -1取消月度计划
     *
     * @param salesPlanSDO
     * @return
     */
    Result<Integer> updateSalesPlanStatus(SalesPlanSDO salesPlanSDO);

    /**
     * 创建月度计划明细模板
     *
     * @param createSalesPlanTemplateRequest
     * @return
     */
    Result<Boolean> createSalesPlanTemplate(CreateSalesPlanTemplateRequest createSalesPlanTemplateRequest);
}
